//
//  WmcMedia.swift
//  YPWatermarkCamera
//
//  Created by 赵新 on 2022/7/12.
//

import UIKit

public extension WmcMedia {
    enum MediaType: Int, CaseIterable {
        case unknown = 0
        case image = 1
        case video = 2
    }
}

// MARK: - [WmcMedia]

open class WmcMedia: NSObject {

    /// 媒体类型
    open func mediaType() -> MediaType {
        return .unknown
    }
}


// 处理资源操作权限相关

private var key: Void?

extension WmcMedia {

    var memberId: Int? {
        get {
            return objc_getAssociatedObject(self, &key) as? Int
        }

        set {
            objc_setAssociatedObject(self, &key, newValue, .OBJC_ASSOCIATION_RETAIN)
        }
    }
}


